border-1px($color)
  position: relative
  &:after
    display: block
    position: absolute
    left: 0
    bottom: 0
    border-top 1px solid $color
    width: 100%
    content: ''

border-none()
  &:after
    display: none

bg-image($url)
  background-image url($url + "@2x.png")
  @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio)
    background-image url($url + "@3x.png")

// 多行文本溢出显示省略号
// line-height:0.38rem-----------------------------------------------------------------------------
.
line-clamp($line)
  overflow: hidden
  display: -webkit-box
  -webkit-line-clamp: $line
  -webkit-box-orient: vertical
  word-break: break-all
  text-overflow: ellipsis

//line-height: $line-height;
//max-height: $line-height * $line + .2rem;

// 单行文本溢出显示省略号
// @align: justify-----------------------------------------------------------------------------
.
text-overflow($align)
  word-wrap: normal
  text-overflow: ellipsis
  white-space: nowrap
  overflow: hidden
  text-align: $align

// 一像素边框
// -----------------------------------------------------------------------------
//.top-line(@color, @zindex: 0) {
//  content: '';
//  position: absolute;
//  z-index: @zindex;
//  top: -1px;
//  left: 0;
//  width: 100%;
//  height: 1px;
//  background-image: linear-gradient(0deg, @color 50%, transparent 50%);
//}
//
//.bottom-line(@color, @zindex: 0) {
//  height: 1px;
//  position: absolute;
//  z-index: @zindex;
//  bottom: 0;
//  left: 0;
//  content: '';
//  width: 100%;
//  background-image: linear-gradient(0deg, @color 50%, transparent 50%);
//}
//
//.left-line(@color, @zindex: 0) {
//  content: '';
//  position: absolute;
//  z-index: @zindex;
//  top: 0;
//  left: 0;
//  width: 1px;
//  height: 100%;
//  background-image: linear-gradient(to left, @color 50%, transparent 50%);
//}
//
//.right-line(@color, @zindex: 0) {
//  content: '';
//  position: absolute;
//  z-index: @zindex;
//  top: 0;
//  right: 0;
//  width: 1px;
//  height: 100%;
//  background-image: linear-gradient(to right, @color 50%, transparent 50%);
//}
